package 笔试;

import java.util.Scanner;
import java.util.TreeSet;

public class 达达集团_找缺失 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split(",");
        int[] arr = new int[s.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(s[i]);
        }
        TreeSet<Integer> set = new TreeSet<>();
        for (int i = 0; i < arr.length; i++) {
            set.add(arr[i]);
        }
        for (int i = 1; i < arr[arr.length-1]; i++) {
            if(!set.contains(i)) {
                System.out.println(i);
            }
        }
    }
}
